package com.qdlc.p2p.dal.dto;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.qdlc.p2p.common.constant.Global;

/**
 *
 * @author liya
 * @version 1.1.0.0
 */
@Entity
@Table(name = Global.DB_PREFIX + "additional_user_movie_ticket")
public class AdditionalUserMovieTicket {

    /** 主键 */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long id;

    /**  发放奖励的用户id */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="user_id")
    private User user;

    /**  发奖奖励的规则id */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "rule_id")
    private AdditionalMovieTicketRule additionalMovieTicketRule;

    /**  状态：0:未使用 1:已兑换 2:已过期 3:无效 4:前往请求php接口/请求接口失败 5：等待出票 */
    private int status;

    /**  赠送电影票个数 */
    private int count;

    /**  订单号 */
    private String orderNo;

    /**  电影票商户ID */
    private String partnerId;

    /**  兑换码 */
    private String exchangeCode;

    /**  获取来源 */
    private String sourceType;

    /**  兑换时间 */
    private Date useTime;

    /**  激活码过期时间 */
    private Date expiredTime;

    /**  添加时间 */
    private Date addTime;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public AdditionalMovieTicketRule getAdditionalMovieTicketRule() {
        return additionalMovieTicketRule;
    }

    public void setAdditionalMovieTicketRule(AdditionalMovieTicketRule additionalMovieTicketRule) {
        this.additionalMovieTicketRule = additionalMovieTicketRule;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getPartnerId() {
        return partnerId;
    }

    public void setPartnerId(String partnerId) {
        this.partnerId = partnerId;
    }

    public String getExchangeCode() {
        return exchangeCode;
    }

    public void setExchangeCode(String exchangeCode) {
        this.exchangeCode = exchangeCode;
    }

    public String getSourceType() {
        return sourceType;
    }

    public void setSourceType(String sourceType) {
        this.sourceType = sourceType;
    }

    public Date getUseTime() {
        return useTime;
    }

    public void setUseTime(Date useTime) {
        this.useTime = useTime;
    }

    public Date getExpiredTime() {
        return expiredTime;
    }

    public void setExpiredTime(Date expiredTime) {
        this.expiredTime = expiredTime;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }
}
